//

import UIKit

class WP_CustomerListTableViewCell: UITableViewCell {
    
    var nameLabel:UILabel!      //name
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: .default, reuseIdentifier: reuseIdentifier)
       setUI()
    }
    
    func setUI()  {
        
        let img = UIImageView(frame: CGRect(x: kRatioWidth(12), y: kRatioHeight(15), width: kRatioWidth(40), height: kRatioHeight(40)))
        img.backgroundColor = UIColor.lightGray
        img.layer.cornerRadius = kRatioWidth(20)
        img.image = UIImage(named: "headerImg")
        self.contentView.addSubview(img)
        
        nameLabel = UILabel(frame: CGRect(x: img.frame.maxX+kRatioWidth(20), y: kRatioHeight(25), width: kRatioWidth(300), height: kRatioHeight(20)))
        nameLabel.textColor = UIColor.black
        nameLabel.font = FontPFRegular(18)
        nameLabel.text = "dddd"
        self.contentView.addSubview(nameLabel)
        
        
    }
    
    func setModel(model:CustomerModel) {
        
        nameLabel.text = "\(model.name ?? "")"
        
    }
    
    
    
    
    
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
   
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
